package com.sky.mapper;

import com.sky.entity.OrderDetail;
import com.sky.vo.OrdersDetailVO;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

import java.util.List;
@Mapper
public interface OrderDetailMapper {

    void insertBatch(List<OrderDetail> orderDetails);
    @Select("select order_id,group_concat(CONCAT(name,number) separator ';')as DetailDish  from order_detail where order_id = #{id} GROUP BY order_id")
    OrdersDetailVO getDetailsByOrderId(Long id);
    @Select("select * from order_detail where order_id = #{id}")
    List<OrderDetail> getByOrderId(Long id);
}
